# $Id: PKGBUILD 88703 2013-04-21 22:24:13Z heftig $
# Maintainer: Jonathan Conder <jonno.conder@gmail.com>

pkgname=gnome-packagekit
pkgver=3.8.1
pkgrel=1
pkgdesc='Collection of graphical tools for PackageKit to be used in the GNOME desktop'
arch=('i686' 'x86_64')
url='http://www.packagekit.org/'
license=('GPL')
depends=('desktop-file-utils' 'gtk3' 'hicolor-icon-theme' 'libnotify'
         'packagekit')
makedepends=('gconf' 'gtk-doc' 'intltool' 'itstool' 'libcanberra' 'upower')
optdepends=('polkit-gnome: required for privileged actions'
            'gnome-settings-daemon-updates: update and message notifications')
options=('!emptydirs' '!libtool')
install="$pkgname.install"
source=("http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz")
sha256sums=('fe0a6368ee5a67419c9332a3b0031ecf1e3e92aa2fe0eb30aa4273f6224d070a')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  _mime='application/x-xz-compressed-tar;application/x-servicepack;'
  sed -i "s@MimeType=.*@MimeType=$_mime@" data/gpk-install-local-file.desktop.in

  sed -i 's@python@python2@' python/enum-convertor.py
  sed -i 's@python enum-convertor.py@python2 enum-convertor.py@' python/packagekit/Makefile.{am,in}

  export PYTHON=/usr/bin/python2
  ./configure --prefix=/usr \
	      --sysconfdir=/etc \
	      --disable-gtk-doc \
	      --disable-schemas-compile \
	      --disable-scrollkeeper
  make -s
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make -s DESTDIR="$pkgdir" install
}
